function changeHeadline(id) {

	$('.links ul li').removeClass('active');
	$('#mn_' + id).addClass('active');
	var img = $('#mn_' + id + ' a').attr('data-url');
	var url = $('#mn_' + id + ' a').attr('href');

	$('#mhref').attr('href', url);
	$('#mimg').attr('src', img);
}

var setTimeName;

function setManset() {

	var aktif = $('#manset_num').val();
	aktif = parseInt(aktif) + 1;
	if (aktif > 15 || aktif < 0) {
		aktif = 0;
	}
	changeHeadline(aktif);
	$('#manset_num').val(aktif);
}

setTimeName = setInterval('setManset()', 7000);


function mansetOver() {
	clearInterval(setTimeName);
}

function mansetOut() {
	setTimeName = setInterval('setManset()', 7000);
}

$("document").ready(function() {
	$('.manset .content').each(function(index, obj) {
		var index = 0;
		$('.links a:not(.tumu)').mouseover(function() {
			console.log(this);
			$('.links ul li').removeClass('active');

			var $image = $(obj).find('.mansetImage');
			var $this = $(this);
			$this.parent().addClass('active');
			$image.attr('href', $this.attr('href'));
			$image.find('img').attr('src', $this.attr('data-url'));

			$('#manset_num').val($this.attr('rel'))
		});
	});

});